<template>
    <view class="star-container">
        <view class="star-item" v-for="(item, index) in count" :key="$u.guid(4) + index">
            <view class="icon" :style="{ color }">&#xe79e;</view>
        </view>
    </view>
</template>

<script lang="ts" setup>
import { computed } from 'vue'

withDefaults(
    defineProps<{
        count: number
        color: string
    }>(),
    {
        count: 0,
        color: '#ffd700'
    }
)
const $u = computed(() => {
    return uni.$u
})

</script>

<style scoped lang="scss">
.star-container {
    display: flex;
}
</style>
